package com.tutu.mp.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.tutu.mp.dao.UserMapper;
import com.tutu.mp.entity.User;
import com.tutu.mp.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @Program: SpringBoot
 * @Description:
 * @Author: JK.TuTu
 * @ @Version: 1.0
 * @Create: 2022-11-29 09:37
 **/
@Service
public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements UserService {


    @Autowired
    private UserMapper userMapper;

    /**
     * 若主键存在则忽略，否则插入
     *
     * @param user
     * @return
     */
    @Override
    public int ignoreInsert(User user) {
        return userMapper.ignoreInsert(user);
    }
}
